﻿using Nop.Core.Domain.Common;
using Nop.Core.Domain.WindAlert;

namespace Nop.Data.Mapping.WindAlert
{
    public partial class SpotMap : NopEntityTypeConfiguration<Spot>
    {
        public SpotMap()
        {
            this.ToTable("WSpot");

            this.HasKey(s => s.Id);
            this.Property(s => s.Name).HasMaxLength(400);
            this.Property(s => s.Description);
            this.Property(s => s.MetaKeywords).HasMaxLength(400);
            this.Property(s => s.MetaDescription);
            this.Property(s => s.MetaTitle).HasMaxLength(400);

            this.HasMany(s => s.Cameras)
                .WithMany()
                .Map(m => m.ToTable("WSpot_Camera_Mapping"));

        }
    }
}